#include <iostream>
#include <iostream>
#include "person.h"

using namespace std;

void test_func(sp<Person> &other) {
    sp<Person> s = other;
    cout << "2.count = " << s->getStrongCount() << endl;
}

int main() {
//    test_func();

    sp<Person> other = new Person();
    cout << "1.count = " << other->getStrongCount() << endl;
    cout << "1.count = " << (*other).getStrongCount() << endl;
    test_func(other);
    cout << "3.count = " << other->getStrongCount() << endl;

    return 0;
}
